package com.lfy.kcat.content.feign;


import org.dromara.common.core.domain.R;
import org.dromara.common.core.dto.DramaAuthManualTaskDTO;
import org.dromara.common.core.dto.DramaAuthStartDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient("camunda-service")
public interface CamundaFeignClient {

    /**
     * 完成用户短剧审核任务
     * @return
     */
    @PutMapping("/process/authtask")
    R claimManualAuthTaskAndComplete(@RequestBody DramaAuthManualTaskDTO dto);


    @PostMapping("/process/start/dramaAuth")
    R startDramaAuthProcess(@RequestBody DramaAuthStartDTO dramaAuthStartDTO);


    /**
     * feign 把远程拿到的json串。转为你指定的类型
     * @param processInstanceId
     * @return
     */
    @GetMapping("/process/variables/{processId}")
    R<Map<String,Object>> getProcessVariables(@PathVariable("processId")
                                              String processInstanceId);
}
